// api/products.ts
export const useProducts1 = async (page: number, pageSize: number) => {
    try {
      const { data } = await $fetch('/api/home/articles', {
        query: {
          page,
          limit: pageSize,
        },
      })
      return data
    } catch (error) {
      console.error('获取产品数据失败:', error)
      throw error
    }
  }
  